import { instantiate, Prefab ,Node} from "cc";
import { resLoader } from "../common/loader/ResLoader";

export class ViewUtil{
    public static createPrefabNode(path:string,bundleName:string = resLoader.defaultBundleName):Node{
        const p = resLoader.get(path,Prefab,bundleName);
        if (p) {
            return instantiate(p)
        }
        return null!;
    }
}